<% var html={ %>
<div class='row zq-row'>

    <div id="zyfb" style="width:98%;height:300px;"></div>
</div>

<div class='row zq-row'>
    <div id="gt06R" style="width:48%;height:300px;float: left"></div>
    <div id="autoR" style="width:48%;height:300px;float: right"></div>
</div>
 <div class='row zq-row'>
    <div id="gt06A" style="width:48%;height:300px;float: left"></div>
    <div id="autoA" style="width:48%;height:300px;float: right"></div>
</div>
<%};%>
<% var js= {%>
<script type='text/javascript' src='/plugin/echarts.min.js'></script>
<script>

    $.post("/console/report/resource",function (data) {
    var optionZyFb = {
        title: {
            text: '资源分布图'
        },
        tooltip: {},
        legend: {
            left:100,
            data:data.data.farmNames
        },
        radar: {

            // shape: 'circle',
            indicator: [
                { name: '农机', max: data.data.machine},
                { name: '农田', max: data.data.farmLand},
                { name: '自动驾驶', max: data.data.autoMachine},
                { name: 'gt06', max: data.data.gt06},
                { name: '机具', max: data.data.machineTool}
            ]
        },
        series: [{
            name: '资源占比',
            type: 'radar',
            // areaStyle: {normal: {}},
            data :  data.data.valueList
        }]
    };
    var myChartzyfb = echarts.init(document.getElementById('zyfb'));
    myChartzyfb.setOption(optionZyFb);
    });
</script>

<script>
    $(function () {

        var autoRoption;
        var autoRmyChart = echarts.init(document.getElementById('autoR'));
        $.post("/console/report/automachine/area/json",function (data) {

            autoRoption = {
                backgroundColor: "#FFFFFF",
                color: data.data.colors,

                title: [{
                    text: '自动驾驶面积统计',
                    textStyle: {
                        color: '#404A59'
                    }
                }],
                tooltip: {
                    trigger: 'axis'
                },
                legend: {
                    x: 300,
                    top: '7%',
                    textStyle: {
                        color: '#0099CC',
                    },
                    data: data.data.names
                },
                grid: {
                    containLabel: true
                },
                toolbox: {
                    "show": false,
                    feature: {
                        saveAsImage: {}
                    }
                },
                xAxis: {
                    type: 'category',
                    "axisLine": {
                        lineStyle: {
                            color: '#FF4500'
                        }
                    },
                    "axisTick": {
                        "show": false
                    },
                    axisLabel: {
                        textStyle: {
                            color: '#404A59'
                        }
                    },
                    boundaryGap: false,
                    data: data.data.time
                },
                yAxis: {
                    name: '单位:亩',
                    "axisLine": {
                        lineStyle: {
                            color: '#404A59'
                        }
                    },
                    splitLine: {
                        show: true,
                        lineStyle: {
                            color: '#404A59'
                        }
                    },
                    "axisTick": {
                        "show": false
                    },
                    axisLabel: {
                        textStyle: {
                            color: '#404A59'
                        }
                    },
                    type: 'value'
                },
                series: data.data.area
            }
            autoRmyChart.setOption(autoRoption);
        })
    });
</script>


<script>
    var gt06RmyChart;
    var gt06Roption;
    $(function () {
        gt06RmyChart = echarts.init(document.getElementById('gt06R'));
        $.post("/console/report/gt06/area/json" ,function (data) {
            gt06Roption = {
                backgroundColor: "#FFFFFF",
                color: data.data.colors,

                title: [{
                    text: 'gt06面积统计',
                    textStyle: {
                        color: '#404A59'
                    }
                }],
                tooltip: {
                    trigger: 'axis'
                },
                legend: {
                    x: 300,
                    top: '7%',
                    textStyle: {
                        color: '#0099CC',
                    },
                    data: data.data.names
                },
                grid: {
                    containLabel: true
                },
                toolbox: {
                    "show": false,
                    feature: {
                        saveAsImage: {}
                    }
                },
                xAxis: {
                    type: 'category',
                    "axisLine": {
                        lineStyle: {
                            color: '#FF4500'
                        }
                    },
                    "axisTick": {
                        "show": false
                    },
                    axisLabel: {
                        textStyle: {
                            color: '#404A59'
                        }
                    },
                    boundaryGap: false,
                    data: data.data.time
                },
                yAxis: {
                    name: '单位:亩',
                    "axisLine": {
                        lineStyle: {
                            color: '#404A59'
                        }
                    },
                    splitLine: {
                        show: true,
                        lineStyle: {
                            color: '#404A59'
                        }
                    },
                    "axisTick": {
                        "show": false
                    },
                    axisLabel: {
                        textStyle: {
                            color: '#404A59'
                        }
                    },
                    type: 'value'
                },
                series: data.data.area
            }
            gt06RmyChart.setOption(gt06Roption);
        })
    });

</script>


<script>

$(function () {
    var gt06AmyChart = echarts.init(document.getElementById('gt06A'));
    $.post("/console/report/gt06/json", function (data) {

        var gt06Aoption = {
            backgroundColor: "#FFFFFF",
            color: data.data.colors,

            title: [{
                text: 'gt06设备活跃数',
                textStyle: {
                    color: '#404A59'
                }
            }],
            tooltip: {
                trigger: 'axis'
            },
            legend: {
                x: 300,
                top: '7%',
                textStyle: {
                    color: '#0099CC',
                },
                data: data.data.names
            },
            grid: {
                containLabel: true
            },
            toolbox: {
                "show": false,
                feature: {
                    saveAsImage: {}
                }
            },
            xAxis: {
                type: 'category',
                "axisLine": {
                    lineStyle: {
                        color: '#FF4500'
                    }
                },
                "axisTick": {
                    "show": false
                },
                axisLabel: {
                    textStyle: {
                        color: '#404A59'
                    }
                },
                boundaryGap: false,
                data: data.data.time
            },
            yAxis: {
                name: '单位:台',
                "axisLine": {
                    lineStyle: {
                        color: '#404A59'
                    }
                },
                splitLine: {
                    show: true,
                    lineStyle: {
                        color: '#404A59'
                    }
                },
                "axisTick": {
                    "show": false
                },
                axisLabel: {
                    textStyle: {
                        color: '#404A59'
                    }
                },
                type: 'value'
            },
            series: data.data.area
        }
        gt06AmyChart.setOption(gt06Aoption);
    });
});
</script>


<script>

$(function () {


    var autoAmyChart = echarts.init(document.getElementById('autoA'));
    $.post("/console/report/automachine/json" ,function (data) {

        var autoAoption = {
            backgroundColor: "#FFFFFF",
            color: data.data.colors,

            title: [{
                text: '自动驾驶设备活跃数',
                textStyle: {
                    color: '#404A59'
                }
            }],
            tooltip: {
                trigger: 'axis'
            },
            legend: {
                x: 300,
                top: '7%',
                textStyle: {
                    color: '#0099CC',
                },
                data: data.data.names
            },
            grid: {
                containLabel: true
            },
            toolbox: {
                "show": false,
                feature: {
                    saveAsImage: {}
                }
            },
            xAxis: {
                type: 'category',
                "axisLine": {
                    lineStyle: {
                        color: '#FF4500'
                    }
                },
                "axisTick": {
                    "show": false
                },
                axisLabel: {
                    textStyle: {
                        color: '#404A59'
                    }
                },
                boundaryGap: false,
                data: data.data.time
            },
            yAxis: {
                name: '单位:台',
                "axisLine": {
                    lineStyle: {
                        color: '#404A59'
                    }
                },
                splitLine: {
                    show: true,
                    lineStyle: {
                        color: '#404A59'
                    }
                },
                "axisTick": {
                    "show": false
                },
                axisLabel: {
                    textStyle: {
                        color: '#404A59'
                    }
                },
                type: 'value'
            },
            series: data.data.area
        }
        autoAmyChart.setOption( autoAoption);
    });
});
</script>
<% }; %>
<% layout("/view/console/skins/skin_2/layout.html", {js:js,html:html}) {} %>
